package com.jintian.smart.oa.mapper;

import com.jintian.smart.kernel.orm.mapper.IBaseExtMapper;
import com.jintian.smart.base.api.oa.entity.BankEntity;
import com.jintian.smart.base.api.oa.form.BankQueryForm;
import com.jintian.smart.base.api.oa.view.BankVO;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.annotation.Mapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;

/**
 * OA办公-OA银行信息
 */
@Mapper
@SqlResource("oa.Bank")
public interface BankMapper extends IBaseExtMapper<BankEntity> {
    /**
     * 根据账号查询
     */
    BankEntity queryByAccountNumber(@Param("enterpriseId") Long enterpriseId, @Param("accountNumber") String accountNumber, @Param("excludeBankId") Long excludeBankId, @Param("deletedFlag") Integer deletedFlag);

    /**
     * 删除银行信息
     */
    void deleteBank(@Param("bankId") Long bankId, @Param("deletedFlag") Integer deletedFlag);

    /**
     * 银行信息分页查询
     */
    PageResult<BankVO> queryPage(@Param("queryForm") BankQueryForm queryForm);

    /**
     * 查询银行信息详情
     */
    BankVO getDetail(@Param("bankId") Long bankId, @Param("deletedFlag") Integer deletedFlag);
}
